<?php
/**
 * @package pmapi
 * @copyright Copyright (c)2014 Enrico Fagnoni
 * @license GNU General Public License version 3, or later
 *
 * @since 1.0.0
 */
 
defined('_JEXEC') or die;
 
// import Joomla modelitem library
jimport('joomla.application.component.modellist');
 
class DatasetModel extends JModelList
{
    
    protected function populateState($ordering = null, $direction = null)
    {
        $jinput= JFactory::getApplication()->input;
        // override any previously stored session pagination limit
        $page_limit = JComponentHelper::getParams('com_pmapi')->get('page_limit',1000);
        $this->setState('list.limitstart', 0 );
        $this->setState('list.start', $jinput->get('start',0, 'uint'));
        $this->setState('list.limit', $jinput->get('limit',$page_limit, 'uint'));
    }      
}